﻿@model IEnumerable<CottagesOfHope.Core.Models.Tasks>

@{
    ViewBag.Title = "Tasks";
    
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")

    @Scripts.Render("~/bundles/jqueryui")
    @Styles.Render("~/Content/themes/base/css")

    <script type="text/javascript">
        $(document).ready(function () {
            $("#StartDate").datepicker({
                changeMonth: true,
                changeYear: true
            });
        });
    </script>
}

<style type ="text/css">
    .text_lbl {
    color: #AAAA33;
    }
</style>
<div class="hero-unit">
<!--<head>
    <title>Tasks</title>
  
   </head>-->

<h2>@ViewBag.Title</h2>
<hr />

    @*<table class="table">
        <thead>
            <tr style="text-align:center;">
                <th style="width:13%;">Title</th>
                <th>Description</th>
                <th style="width:15%;">Start Date</th>
                <th style="width:15%;">End Date</th>
                <th style="width:15%;">Start Time</th>
                <th style="width:15%;">End Time</th>
            </tr>
        </thead>
        <tbody>
        @foreach (var i in Model)
        {
            <tr>
                <td>@i.Title</td>
                <td>@i.Description</td>
                <td>@i.StartDate</td>
                <td>@i.EndDate</td>
                <td>@i.StartTime</td>
                <td>@i.EndTime</td>
            </tr>
        } 
        </tbody>
    </table>*@

        <div class="tabbable tabs-left">
            <ul class="nav nav-tabs">
                 @{int j=0;}
                 @foreach (var i in Model)
                 {
                      <li>
                          <a href="#@j" data-toggle="tab">@i.Title</a>
                          @{j++;}
                      </li>
                 }
            </ul>
            @{j=0;}
            <div class="tab-content">
                @foreach (var i in Model)
                {
                    <div class="tab-pane" id="@j">
                        @*<ul>
                            <li>@i.Title</li>
                            <li>@i.Description</li>
                            <li>@i.StartDate</li>
                            <li>@i.EndDate</li>
                            <li>@i.StartTime</li>
                            <li>@i.EndTime</li>
                        </ul>*@
                        <h2>@i.Title</h2>
                        <p>@i.Description</p>
                        @{j++;}
                    </div>
                }
            </div>
        </div>
    </div>
    @*<fieldset>
        <legend>Task</legend>

        <div class="text_lbl">
            @Html.LabelFor(model => model.Title, "Task Name")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.StartDate, "Start Date")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.StartDate)
           
            @Html.ValidationMessageFor(model => model.StartDate)
        </div>

          <div class="editor-label">
            @Html.LabelFor(model => model.EndDate, "End Date")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.EndDate)
           
            @Html.ValidationMessageFor(model => model.EndDate)
        </div>

     <div class="editor-label">
            @Html.LabelFor(model => model.StartTime, "Start Time")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.StartTime)
            @Html.ValidationMessageFor(model => model.StartTime)
        </div>
         <div class="editor-label">
            @Html.LabelFor(model => model.EndTime, "End Time")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.EndTime)
            @Html.ValidationMessageFor(model => model.EndTime)
        </div>

         <div class="editor-label">
           @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>
        <p>
            <input id="submit" type= "submit" name ="submit" value="Save" />
        </p>
    </fieldset> 
    *@

    <div class="pull-right">
        <button class="btn btn-large" type="button" onClick="window.location.href='Task/Create'">Create Task</button>
    </div>

 @Scripts.Render("~/bundles/jquery")